Skip to content

Add peaks_on_probe widget.#3022

Merged
alejoe91 merged 2 commits intoSpikeInterface:mainfrom
JoeZiminski:add_plot_spikes_on_probe_widget
Jun 21, 2024
Merged

Add peaks_on_probe widget.#3022
alejoe91 merged 2 commits intoSpikeInterface:mainfrom
JoeZiminski:add_plot_spikes_on_probe_widget

Conversation

@JoeZiminski
Copy link
Collaborator

@JoeZiminski JoeZiminski commented Jun 12, 2024

This PR adds a 'Peaks on Probe' widget that plots the peak locations overlaid on a plot of the probe (I am not a huge fan of the name myself, feel free to suggest others!). This PR closes #2986.

image

This plot has come up a few times in documentation and tutorials so I think could be a handy plotting function to have. A nice future addition would be to color-by-unit but if understand correctly from @samuelgarcia this is not currently possible as peaks do not hold unit. For me it is okay to include as-is and refine later if desired, the main reason I would like it is to import and call it from the motion/drift tutorial in #2879.

Overview

The function works by taking two main inputs, pre-calculated 'peaks' and corresponding 'peak_locations'. This can be either a single one of each or a list of corresponding entries. If multiple peaks / peak locations are passed, they are plot on different column axes of the same plot.

It is optional to select to only plot peaks from a certain segment, or between two times, to restrict the y-axis limits and to handle how peaks are decimated before plotting.

Questions

I think I might be using make_mpl_figure() wrong, I am performing 1 index operation to move the Axes objects to a 1d array here. Is this okay?

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

widgets Related to widgets module

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Is there a widget for plotting the 'peak localisation'?

4 participants